var PursueManager = function(){
	this.interact = function(tpf,entities){
		for(var i=0;i<entities.length;i++){
		pursueComponent = entities[i].pursueComponent;
		vehicleComponent = entities[i].vehicleComponent;
		spatialComponent = entities[i].spatialComponent;

		distanceVector = pursueComponent.target.spatialComponent.position.subtract(spatialComponent.position);
		distance = Math.sqrt(distanceVector.e(1)*distanceVector.e(1)+distanceVector.e(2)*distanceVector.e(2));

		T = distance*1.2;

		targetPosition = pursueComponent.target.spatialComponent.position.add(pursueComponent.target.vehicleComponent.velocity.x(T*tpf))
		
		pursueComponent.targetPosition = targetPosition;
		
		desired_velocity = spatialComponent.position.subtract(targetPosition).truncate(-1).x(vehicleComponent.max_speed);
		steering = desired_velocity.subtract(vehicleComponent.velocity);
		vehicleComponent.steering_direction = steering;
		
		pursueComponent.steering_direction = steering;
		}
	}
}